From bd7da13869d3b1b21cf9ab5084523ac582f7fddf Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Thu, 11 Feb 2010 23:09:38 +0000 Subject: [PATCH] Simplification as per Bryan on r62339 comment --- includes/api/ApiBase.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index cd30412c72..7bd9216899 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -973,15 +973,16 @@ abstract class ApiBase { $ret = array(); if ( $this->mustBePosted() ) { - $ret = array_merge( $ret, array( array ( 'mustbeposted', $this->getModuleName() ) ) ); + $ret[] = array ( 'mustbeposted', $this->getModuleName() ); } if ( $this->isReadMode() ) { - $ret = array_merge( $ret, array( array ( 'readrequired' ) ) ); + $ret[] = array ( 'readrequired' ); } if ( $this->isWriteMode() ) { - $ret = array_merge( $ret, array( array ( 'writerequired' ), array( 'writedisabled' ) ) ); + $ret[] = array ( 'writerequired' ); + $ret[] = array ( 'writedisabled' ); } return $ret; -- 2.20.1